from __future__ import annotations

from dataclasses import dataclass


@dataclass
class RoadPassResult:
    ground_pressure_kPa: float
    ok: bool
    note: str


def check_temporary_road_pass(axle_load_kN: float, tire_contact_area_m2: float, allowable_kPa: float = 150.0) -> RoadPassResult:
    """临时道路通过性：地面压强=车轴荷载/接地面积。"""

    p = axle_load_kN * 1000.0 / max(1e-6, tire_contact_area_m2)
    ok = p <= allowable_kPa
    return RoadPassResult(ground_pressure_kPa=p, ok=ok, note="若不满足，可铺钢板或枕木")


